﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

namespace QuanLyNhapXuat.Presentation.Report
{
    public partial class frm_reportNhapXuat : Form
    {
        public frm_reportNhapXuat()
        {
            InitializeComponent();
        }
        public string makh;
        private void frm_reportNhapXuat_Load(object sender, EventArgs e)
        {
            report_NhapXuat report_nhapxuat = new report_NhapXuat();
            ParameterFieldDefinitions crParameterFieldDefinitions;
            ParameterFieldDefinition crParameterFieldDefinition;
            ParameterValues crParameterValues = new ParameterValues();
            ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();

            crParameterDiscreteValue.Value = makh;
            crParameterFieldDefinitions = report_nhapxuat.DataDefinition.ParameterFields;
            crParameterFieldDefinition = crParameterFieldDefinitions["makh"];
            crParameterValues = crParameterFieldDefinition.CurrentValues;

            crParameterValues.Clear();
            crParameterValues.Add(crParameterDiscreteValue);
            crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);

            crystalReportViewer1.ReportSource = report_nhapxuat;
            crystalReportViewer1.Refresh();
        }
    }
}
